home *** CD-ROM | disk | FTP | other *** search
- unit EFECommon;
-
- {
- Author : Guy Smith-Ferrier
- Date : February 2000
- Description:
- This unit is common to all of the Enhanced Fields Editors. It is contains the
- function which is shared by every Enhanced Fields Editor in this package,
- namely, EFEGetControlClass. By changing this one routine you can modify the
- behaviour of all of the Enhanced Field Editors.
-
- The implemention in this module is simple. To decide which component class to
- use EFEGetControlClass performs a lookup of the field's class name in an INI
- file.
- }
-
- interface
-
- uses
- DB;
-
- function EFEGetControlClass(Field: TField): string;
-
- implementation
-
- uses
- INIFiles;
-
- function EFEGetControlClass(Field: TField): string;
- var
- INI: TINIFile;
- begin
- Result:='';
- INI:=TINIFile.Create('EFEDITOR.INI');
- try
- Result:=INI.ReadString('TControlClasses', Field.ClassName, '');
- finally
- INI.Free;
- end;
- end;
-
- end.
-